Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>File (command)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/File_(command)"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-File_command rootpage-File_command skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main">file (command)</span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">"File (software)" redirects here. For the file management program bundled with <a href="IOS_11" title="IOS 11">iOS 11</a>, see <a href="Files_(software)" class="mw-redirect" title="Files (software)">Files (software)</a>.</div>
<style data-mw-deduplicate="TemplateStyles:r1295905060">
/* start https://en.wikipedia.org/ */


.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}@media screen{html.skin-theme-clientpref-night .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media(min-width:640px){body.skin--responsive .mw-parser-output .infobox-table{display:table!important}body.skin--responsive .mw-parser-output .infobox-table>caption{display:table-caption!important}body.skin--responsive .mw-parser-output .infobox-table>tbody{display:table-row-group}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}


/* end https://en.wikipedia.org/ */
</style><table class="infobox vevent"><tbody><tr><th colspan="2" class="infobox-above summary">file</th></tr><tr><td colspan="2" class="infobox-image logo"><div class="infobox-caption">Example usage of <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">file</code></div></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Programmer" title="Programmer">Developer(s)</a></th><td class="infobox-data"><a href="AT%26T_Bell_Laboratories" class="mw-redirect" title="AT&amp;T Bell Laboratories">AT&amp;T Bell Laboratories</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;">Initial release</th><td class="infobox-data">1973<span style="display: none;">&nbsp;(<span class="bday dtstart published updated itvstart">1973</span>)</span> as part of <a href="Unix_Research_Version_4" class="mw-redirect" title="Unix Research Version 4">Unix Research Version 4</a>; 1986<span style="display: none;">&nbsp;(<span class="bday dtstart published updated itvstart">1986</span>)</span> open-source reimplementation</td></tr><tr style="display: none;"><td colspan="2" class="infobox-full-data"></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_release_life_cycle" title="Software release life cycle">Stable release</a></th><td class="infobox-data"><div style="margin:0px;">5.46<sup id="cite_ref-wikidata-d1df2b3abe20265ef8edee5f11b1cfccd9fb00e3-v20_1-0" class="reference"><a href="#cite_note-wikidata-d1df2b3abe20265ef8edee5f11b1cfccd9fb00e3-v20-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>&nbsp;
/ 27 November 2024<span style="display:none">&nbsp;(<span class="bday dtstart published updated">27 November 2024</span>)</span></div></td></tr><tr style="display:none"><td colspan="2">
</td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Repository_(version_control)" title="Repository (version control)">Repository</a></th><td class="infobox-data"><span class="url"><a rel="nofollow" class="external text" href="https://github.com/file/file">github<wbr>.com<wbr>/file<wbr>/file</a></span></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;">Written in</th><td class="infobox-data"><a href="C_(programming_language)" title="C (programming language)">C</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Operating_system" title="Operating system">Operating system</a></th><td class="infobox-data"><a href="Unix" title="Unix">Unix</a>, <a href="Unix-like" title="Unix-like">Unix-like</a>, <a href="Plan_9_from_Bell_Labs" title="Plan 9 from Bell Labs">Plan 9</a>, <a href="IBM_i" title="IBM i">IBM i</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Computing_platform" title="Computing platform">Platform</a></th><td class="infobox-data"><a href="Cross-platform" class="mw-redirect" title="Cross-platform">Cross-platform</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_categories#Categorization_approaches" title="Software categories">Type</a></th><td class="infobox-data"><a href="File_type" class="mw-redirect" title="File type">File type</a> detector</td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_license" title="Software license">License</a></th><td class="infobox-data"><a href="BSD_license" class="mw-redirect" title="BSD license">BSD license</a>, <a href="Common_Development_and_Distribution_License" title="Common Development and Distribution License">CDDL</a><br>Plan 9: <a href="MIT_License" title="MIT License">MIT License</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;">Website</th><td class="infobox-data"><span class="url"><a rel="nofollow" class="external text" href="https://darwinsys.com/file/">darwinsys<wbr>.com<wbr>/file<wbr>/</a></span></td></tr></tbody></table>
<p><b><code>file</code></b> is a <a href="Shell_(computing)" title="Shell (computing)">shell</a> <a href="Command_(computing)" title="Command (computing)">command</a> for reporting the type of data contained in a <a href="Computer_file" title="Computer file">file</a>. It is commonly supported in <a href="Unix" title="Unix">Unix</a> and <a href="Unix-like" title="Unix-like">Unix-like</a> <a href="Operating_systems" class="mw-redirect" title="Operating systems">operating systems</a>.
</p><p>As the command uses relatively quick-running <a href="Heuristic" title="Heuristic">heuristics</a> to determine <a href="File_type" class="mw-redirect" title="File type">file type</a>, it can report misleading information. The command can be fooled, for example, by including a magic number in the content even if the rest of the content does not match what the magic number indicates. The command report cannot be taken as completely trustworthy.
</p><p>The <a href="Single_UNIX_Specification" title="Single UNIX Specification">Single UNIX Specification</a> (SUS) requires the command to exhibit the following behavior with respect to the file specified via the <a href="Command-line_interface" title="Command-line interface">command-line</a>:
</p>
<ol><li>If the file cannot be read, or its <a href="Unix_file_type" class="mw-redirect" title="Unix file type">Unix file type</a> is undetermined, the command will report that the file was processed but its type was undetermined</li>
<li>The command must be able to determine the types <a href="Folder_(computing)" class="mw-redirect" title="Folder (computing)">directory</a>, <a href="Named_pipe" title="Named pipe">FIFO</a>, <a href="Unix_domain_socket" title="Unix domain socket">socket</a>, block <a href="Device_file" title="Device file">special file</a>, and character special file</li>
<li>A zero-length file is reported as such</li>
<li>An initial part of file is considered and the command is to use position-sensitive tests</li>
<li>The entire file is considered and the command is to use context-sensitive tests</li>
<li>Otherwise, the file is reported as a data file</li></ol>
<p>Position-sensitive tests are normally implemented by matching various locations within the file against a textual database of <a href="Magic_number_(programming)" title="Magic number (programming)">magic numbers</a> (see the Usage section). This differs from other simpler methods such as <a href="File_extension" class="mw-redirect" title="File extension">file extensions</a> and schemes like <a href="MIME" title="MIME">MIME</a>.
</p><p>In the System V implementation, the Ian Darwin implementation, and the OpenBSD implementation, the command uses a database to drive the probing of the lead bytes. That database is stored as a file that is located in <code>/etc/magic</code>, <code>/usr/share/file/magic</code> or similar.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="History">History</h2></div>
<p>The <code>file</code> command originated in <a href="Unix_Research_Version_4" class="mw-redirect" title="Unix Research Version 4">Unix Research Version 4</a><sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> in 1973. <a href="System_V" class="mw-redirect" title="System V">System V</a> brought a major update with several important changes, most notably moving the file type information into an external text file rather than compiling it into the binary itself.
</p><p>Most major <a href="BSD" class="mw-redirect" title="BSD">BSD</a> and <a href="Linux" title="Linux">Linux</a> distributions include a <a href="Free_software" title="Free software">free</a>, <a href="Open-source_software" title="Open-source software">open-source</a> implementation that was written from scratch by Ian Darwin in 1986–87.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> It keeps file type information in a text file with a format based on that of the System V version. It was expanded by <a href="Geoff_Collyer" title="Geoff Collyer">Geoff Collyer</a> in 1989 and since then has had input from many others, including Guy Harris, Chris Lowth and Eric Fischer. From late 1993 onward, its maintenance has been organized by Christos Zoulas. The <a href="OpenBSD" title="OpenBSD">OpenBSD</a> system has its own subset implementation written from scratch, but still uses the Darwin/Zoulas collection of magic file formatted information.
</p><p>The <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">file</code> command was ported to the <a href="IBM_i" title="IBM i">IBM i</a> operating system.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p><p>As of version 4.00 of the Ian Darwin/Christos Zoulas implementation of <code>file</code>, the functionality of the command is implemented in and exposed by a <code>libmagic</code> <a href="Library_(computing)" title="Library (computing)">library</a> that is accessible to consuming code via <a href="C_(programming_language)" title="C (programming language)">C</a> (and compatible) linking.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Usage">Usage</h2></div>
<p>The SUS<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> mandates the following command-line options:
</p>
<ul><li><code>-M <i>file</i></code>, prevents the default position-sensitive and context-sensitive tests in favor of the tests specified in a specially formatted file</li>
<li><code>-m <i>file</i></code>, same as for <code>-M</code>, but with tests in addition to the default</li>
<li><code>-d</code>, selects default position-sensitive and context-sensitive tests; this is the default behavior unless <code>-M</code> or <code>-m</code> are specified</li>
<li><code>-h</code>, do not dereference <a href="Symbolic_link" title="Symbolic link">symbolic links</a> that point to an existing file or directory</li>
<li><code>-L</code>, dereference the symbolic link that points to an existing file or directory</li>
<li><code>-i</code>, do not classify the file further than to report as: nonexistent, a block special file, a character special file, a directory, a <a href="Named_pipe" title="Named pipe">FIFO</a>, a socket, a symbolic link, or a regular file; the Ian Darwin and OpenBSD versions behave differently with this option and instead output an <a href="Internet_media_type" class="mw-redirect" title="Internet media type">Internet media type</a> ("<a href="MIME" title="MIME">MIME</a> type") identifying the recognized file format</li></ul>
<p>Implementations may add extra options. Ian Darwin's implementation adds <code>-s</code> 'special files', <code>-k</code> 'keep-going' or <code>-r</code> 'raw', among many others.<sup id="cite_ref-linux_10-0" class="reference"><a href="#cite_note-linux-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Examples">Examples</h2></div>
<p>For a <a href="C_(programming_language)" title="C (programming language)">C</a> <a href="Source_code" title="Source code">source code</a> file, <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">file main.c</code> reports:
</p>
<pre>main.c: C program text
</pre>
<p>For a compiled executable, <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">file program</code> reports information like:
</p>
<pre>program: <a href="Executable_and_Linkable_Format" title="Executable and Linkable Format">ELF</a> <a href="32-bit" class="mw-redirect" title="32-bit">32-bit</a> <a href="Least_significant_bit" class="mw-redirect" title="Least significant bit">LSB</a> <a href="Executable" title="Executable">executable</a>, <a href="Intel_80386" class="mw-redirect" title="Intel 80386">Intel 80386</a>, version 1 (<a href="SYSV" class="mw-redirect" title="SYSV">SYSV</a>), <a href="Dynamically_linked" class="mw-redirect" title="Dynamically linked">dynamically linked</a>
(uses <a href="Shared_Library" class="mw-redirect" title="Shared Library">shared libs</a>), <a href="Strip_(Unix)" title="Strip (Unix)">stripped</a>
</pre>
<p>For a block device <a href="Device_file#Naming_conventions" title="Device file">/dev/hda</a>, <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">file /dev/hda1</code> reports:
</p>
<pre>/dev/hda1: <a href="Device_file#Block_devices" title="Device file">block special</a> (0/0)
</pre>
<p>By default, <code>file</code> does not try to read a device file due to potential undesirable effects. But using the non-standard option <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">-s</code> (available in the Ian Darwin branch), which requests to read device files to identify content, <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">file -s /dev/hda1</code> reports details such as:
</p>
<pre>/dev/hda1: Linux/<a href="I386" title="I386">i386</a> <a href="Ext2" title="Ext2">ext2</a> <a href="Filesystem" class="mw-redirect" title="Filesystem">filesystem</a>
</pre>
<p>Via Ian Darwin's non-standard option <code>-k</code>, the command does not stop after the first hit found, but looks for other matching patterns. The <code>-r</code> option, which is available in some versions, causes the <a href="Newline" title="Newline">new line</a> character to be displayed in its raw form rather than in its octal representation. On Linux, <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">file -k -r libmagic-dev_5.35-4_armhf.deb</code> reports information like:
</p>
<pre>libmagic-dev_5.35-4_<a href="Armhf" class="mw-redirect" title="Armhf">armhf</a>.<a href="Deb_(file_format)" title="Deb (file format)">deb</a>: Debian binary package (format 2.0)
- current <a href="Ar_(Unix)" title="Ar (Unix)">ar</a> archive
- data
</pre>
<p>For a compressed file, <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">file compressed.gz</code> reports information like:
</p>
<pre>compressed.gz: <a href="Gzip" title="Gzip">gzip</a> <a href="Data_compression" title="Data compression">compressed</a> data, <a href="DEFLATE" class="mw-redirect" title="DEFLATE">deflated</a>, original filename, `compressed', last
modified: Thu Jan 26 14:08:23 2006, <a href="Operating_system" title="Operating system">os</a>: Unix
</pre>
<p>For a compressed file, <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">file -i compressed.gz</code> reports information like:
</p>
<pre>compressed.gz: <a href="Media_type" title="Media type">application/x-gzip</a>; <a href="Character_set" class="mw-redirect" title="Character set">charset</a>=<a href="Binary_file" title="Binary file">binary</a>
</pre>
<p>For a PPM file, <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">file data.ppm</code> reports;
</p>
<pre>data.ppm: <a href="Netpbm_format" class="mw-redirect" title="Netpbm format">Netpbm PPM</a> "rawbits" image data
</pre>
<p>For a <a href="Mach-O" title="Mach-O">Mach-O</a> <a href="Universal_binary" title="Universal binary">universal binary</a>, <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">file /bin/cat</code> reports like:
</p>
<pre>/bin/cat: Mach-O universal binary with 2 <a href="Instruction_set_architecture" title="Instruction set architecture">architectures</a>
/bin/cat (for architecture <a href="PowerPC" title="PowerPC">ppc7400</a>): Mach-O executable ppc
/bin/cat (for architecture i386): Mach-O executable i386
</pre>
<p>For a <a href="Symbolic_link" title="Symbolic link">symbolic link</a>, <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">file /usr/bin/vi</code> reports:
</p>
<pre>/usr/bin/vi: symbolic link to vim
</pre>
<p>Identifying a symbolic link is not available on all platforms and will be dereferenced if <code>-L</code> is passed or <code>POSIXLY_CORRECT</code> is set.
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="List_of_POSIX_commands" title="List of POSIX commands">List of POSIX commands</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-wikidata-d1df2b3abe20265ef8edee5f11b1cfccd9fb00e3-v20-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-wikidata-d1df2b3abe20265ef8edee5f11b1cfccd9fb00e3-v20_1-0">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://mailman.astron.com/pipermail/file/2024-November/001435.html">"[File] FIle 5.46 is now available"</a>. 27 November 2024<span class="reference-accessdate">. Retrieved <span class="nowrap">28 November</span> 2024</span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man1/file.1">"Source of the UNIX V4 "file" man page"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20191210000719/https://minnie.tuhs.org/cgi-bin/utree.pl?file=V4%2Fman%2Fman1%2Ffile.1">Archived</a> from the original on 2019-12-10<span class="reference-accessdate">. Retrieved <span class="nowrap">2022-03-13</span></span>.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text">The early history of this program is recorded in its private CVS repository; see <a rel="nofollow" class="external autonumber" href="https://www.darwinsys.com/file/file.c.log.txt">[1]</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20170401080455/https://www.darwinsys.com/file/file.c.log.txt">Archived</a> 2017-04-01 at the <a href="Wayback_Machine" title="Wayback Machine">Wayback Machine</a> the log of the main program</span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzahz/rzahzpdf.pdf?view=kc">"IBM System i Version 7.2 Programming Qshell"</a> <span class="cs1-format">(PDF)</span>. <i><a href="IBM" title="IBM">IBM</a></i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20210305180649/https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzahz/rzahzpdf.pdf?view=kc">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2021-03-05<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-09-05</span></span>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://manned.org/libmagic.3">libmagic(3)</a></code></span>&nbsp;–&nbsp;<a href="Linux" title="Linux">Linux</a> Programmer's <a href="Man_page" title="Man page">Manual</a> – Library Functions</span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://man.netbsd.org/libmagic.3">libmagic(3)</a></code></span>&nbsp;–&nbsp;<a href="NetBSD" title="NetBSD">NetBSD</a> Library Functions <a href="Man_page" title="Man page">Manual</a></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite id="CITEREFZoulas2003" class="citation mailinglist cs1">Zoulas, Christos (February 27, 2003). <a rel="nofollow" class="external text" href="https://mx.gw.com/pipermail/file/2003/000034.html">"file-3.41 is now available"</a>. <i>File</i> (Mailing list). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20160304040612/https://mx.gw.com/pipermail/file/2003/000034.html">Archived</a> from the original on March 4, 2016<span class="reference-accessdate">. Retrieved <span class="nowrap">January 1,</span> 2013</span>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite id="CITEREFZoulas2003" class="citation mailinglist cs1">Zoulas, Christos (March 24, 2003). <a rel="nofollow" class="external text" href="https://mx.gw.com/pipermail/file/2003/000043.html">"file-4.00 is now available"</a>. <i>File</i> (Mailing list). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20161228123411/https://mx.gw.com/pipermail/file/2003/000043.html">Archived</a> from the original on December 28, 2016<span class="reference-accessdate">. Retrieved <span class="nowrap">January 1,</span> 2013</span>.</cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://pubs.opengroup.org/onlinepubs/9799919799/utilities/file.html">"The Open Group Base Specifications Issue 8 — <i>file</i> command"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2025-05-05</span></span>.</cite></span>
</li>
<li id="cite_note-linux-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-linux_10-0">^</a></b></span> <span class="reference-text"><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://manned.org/file.1">file(1)</a></code></span>&nbsp;–&nbsp;<a href="Linux" title="Linux">Linux</a> User <a href="Man_page" title="Man page">Manual</a> – User Commands</span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1290876196">
/* start https://en.wikipedia.org/ */


.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .infobox .side-box{font-size:100%}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1237033735">
/* start https://en.wikipedia.org/ */


@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}


/* end https://en.wikipedia.org/ */
</style><div class="side-box side-box-right sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">
/* start https://en.wikipedia.org/ */


.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}


/* end https://en.wikipedia.org/ */
</style>
<div class="side-box-flex">
<div class="side-box-image"><span class="noviewer" typeof="mw:File"></span></div>
<div class="side-box-text plainlist">The Wikibook <i><a href="https://en.wikibooks.org/wiki/Guide_to_Unix" class="extiw external" title="wikibooks:Guide to Unix">Guide to Unix</a></i> has a page on the topic of: <i><b><a href="https://en.wikibooks.org/wiki/Guide_to_Unix/Commands" class="extiw external" title="wikibooks:Guide to Unix/Commands">Commands</a></b></i></div></div>
</div>
<ul><li><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://pubs.opengroup.org/onlinepubs/9799919799/utilities/file.html">file</a></code></span>:&nbsp;determine file type&nbsp;–&nbsp;Shell and Utilities Reference, <a href="Single_Unix_Specification" class="mw-redirect" title="Single Unix Specification">The Single UNIX Specification</a>, Version 5 from <a href="The_Open_Group" title="The Open Group">The Open Group</a></li></ul>
<ul><li><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://manned.org/file.1">file(1)</a></code></span>&nbsp;–&nbsp;<a href="Linux" title="Linux">Linux</a> User <a href="Man_page" title="Man page">Manual</a> – User Commands</li>
<li><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://man.netbsd.org/libmagic.3">libmagic(3)</a></code></span>&nbsp;–&nbsp;<a href="NetBSD" title="NetBSD">NetBSD</a> Library Functions <a href="Man_page" title="Man page">Manual</a></li>
<li><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://manned.org/libmagic.3">libmagic(3)</a></code></span>&nbsp;–&nbsp;<a href="Linux" title="Linux">Linux</a> Programmer's <a href="Man_page" title="Man page">Manual</a> – Library Functions</li>
<li><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://man.openbsd.org/file.1">file(1)</a></code></span>&nbsp;–&nbsp;<a href="OpenBSD" title="OpenBSD">OpenBSD</a> General Commands <a href="Man_page" title="Man page">Manual</a> – a non-Ian Darwin implementation</li>
<li><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://9p.io/magic/man2html/1/file">file(1)</a></code></span>&nbsp;–&nbsp;<a href="Plan_9_from_Bell_Labs" title="Plan 9 from Bell Labs">Plan 9</a> Programmer's Manual, Volume 1 – a non-Ian Darwin, non-SUS implementation</li></ul>
<ul><li><a rel="nofollow" class="external text" href="https://darwinsys.com/file/">Fine Free File Command</a> – homepage for Ian Darwin's version of <code>file</code> used in major BSD and Linux distributions.
<ul><li><a rel="nofollow" class="external text" href="https://mailman.astron.com/mailman/listinfo/file">mailing list</a></li>
<li><a rel="nofollow" class="external text" href="https://ftp.astron.com/pub/file">releases</a></li></ul></li>
<li><a rel="nofollow" class="external text" href="https://github.com/ReFirmLabs/binwalk">binwalk</a>, a firmware analysis tool that carves files based on libmagic signatures</li>
<li><a rel="nofollow" class="external text" href="https://mark0.net/soft-trid-e.html">TrID</a>, an alternative providing ranked answers (instead of just one) based on statistics.</li>
<li><a rel="nofollow" class="external text" href="https://google.github.io/magika/">Magika</a>, an ML-based tool, by Google Research</li></ul>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Unix_command-line_interface_programs_and_shell_builtins541" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div id="Unix_command-line_interface_programs_and_shell_builtins541" style="font-size:114%;margin:0 4em"><a href="Unix" title="Unix">Unix</a> <a href="Command-line_interface" title="Command-line interface">command-line interface</a> programs and <a href="Shell_builtin" title="Shell builtin">shell builtins</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">File system</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Cat_(Unix)" title="Cat (Unix)">cat</a></li>
<li><a href="Chattr" title="Chattr">chattr</a></li>
<li><a href="Chmod" title="Chmod">chmod</a></li>
<li><a href="Chown" title="Chown">chown</a></li>
<li><a href="Chgrp" title="Chgrp">chgrp</a></li>
<li><a href="Cksum" title="Cksum">cksum</a></li>
<li><a href="Cmp_(Unix)" title="Cmp (Unix)">cmp</a></li>
<li><a href="Cp_(Unix)" title="Cp (Unix)">cp</a></li>
<li><a href="Dd_(Unix)" title="Dd (Unix)">dd</a></li>
<li><a href="Du_(Unix)" title="Du (Unix)">du</a></li>
<li><a href="Df_(Unix)" title="Df (Unix)">df</a></li>

<li><a href="Fuser_(Unix)" title="Fuser (Unix)">fuser</a></li>
<li><a href="Ln_(Unix)" title="Ln (Unix)">ln</a></li>
<li><a href="Ls" title="Ls">ls</a></li>
<li><a href="Mkdir" title="Mkdir">mkdir</a></li>
<li><a href="Mv_(Unix)" title="Mv (Unix)">mv</a></li>
<li><a href="Pax_(command)" title="Pax (command)">pax</a></li>
<li><a href="Pwd" title="Pwd">pwd</a></li>
<li><a href="Rm_(Unix)" title="Rm (Unix)">rm</a></li>
<li><a href="Rmdir" title="Rmdir">rmdir</a></li>
<li><a href="Split_(Unix)" title="Split (Unix)">split</a></li>
<li><a href="Tee_(command)" title="Tee (command)">tee</a></li>
<li><a href="Touch_(command)" title="Touch (command)">touch</a></li>
<li><a href="Type_(Unix)" title="Type (Unix)">type</a></li>
<li><a href="Umask" title="Umask">umask</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Processes</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="At_(command)" title="At (command)">at</a></li>
<li><a href="Job_control_(Unix)#Commands" title="Job control (Unix)">bg</a></li>
<li><a href="Cron" title="Cron">crontab</a></li>
<li><a href="Job_control_(Unix)#Commands" title="Job control (Unix)">fg</a></li>
<li><a href="Kill_(command)" title="Kill (command)">kill</a></li>
<li><a href="Nice_(Unix)" title="Nice (Unix)">nice</a></li>
<li><a href="Ps_(Unix)" title="Ps (Unix)">ps</a></li>
<li><a href="Time_(Unix)" title="Time (Unix)">time</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">User environment</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Env" title="Env">env</a></li>
<li><a href="Exit_(command)" title="Exit (command)">exit</a></li>
<li><a href="Logname" title="Logname">logname</a></li>
<li><a href="Mesg" title="Mesg">mesg</a></li>
<li><a href="Talk_(software)" title="Talk (software)">talk</a></li>
<li><a href="Tput" title="Tput">tput</a></li>
<li><a href="Uname" title="Uname">uname</a></li>
<li><a href="Who_(Unix)" title="Who (Unix)">who</a></li>
<li><a href="Write_(Unix)" title="Write (Unix)">write</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Text processing</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="AWK" title="AWK">awk</a></li>
<li><a href="Basename" title="Basename">basename</a></li>
<li><a href="Comm" title="Comm">comm</a></li>
<li><a href="Csplit" title="Csplit">csplit</a></li>
<li><a href="Cut_(Unix)" title="Cut (Unix)">cut</a></li>
<li><a href="Diff" title="Diff">diff</a></li>
<li><a href="Dirname" title="Dirname">dirname</a></li>
<li><a href="Ed_(text_editor)" class="mw-redirect" title="Ed (text editor)">ed</a></li>
<li><a href="Ex_(text_editor)" title="Ex (text editor)">ex</a></li>
<li><a href="Fold_(Unix)" title="Fold (Unix)">fold</a></li>
<li><a href="Head_(Unix)" title="Head (Unix)">head</a></li>
<li><a href="Iconv" title="Iconv">iconv</a></li>
<li><a href="Join_(Unix)" title="Join (Unix)">join</a></li>
<li><a href="M4_(computer_language)" title="M4 (computer language)">m4</a></li>
<li><a href="More_(command)" title="More (command)">more</a></li>
<li><a href="Nl_(Unix)" title="Nl (Unix)">nl</a></li>
<li><a href="Paste_(Unix)" title="Paste (Unix)">paste</a></li>
<li><a href="Patch_(Unix)" title="Patch (Unix)">patch</a></li>
<li><a href="Printf_(Unix)" title="Printf (Unix)">printf</a></li>
<li><a href="Read_(Unix)" title="Read (Unix)">read</a></li>
<li><a href="Sed" title="Sed">sed</a></li>
<li><a href="Sort_(Unix)" title="Sort (Unix)">sort</a></li>
<li><a href="Strings_(Unix)" title="Strings (Unix)">strings</a></li>
<li><a href="Tail_(Unix)" title="Tail (Unix)">tail</a></li>
<li><a href="Tr_(Unix)" title="Tr (Unix)">tr</a></li>
<li><a href="Troff" title="Troff">troff</a></li>
<li><a href="Uniq" title="Uniq">uniq</a></li>
<li><a href="Vi_(text_editor)" title="Vi (text editor)">vi</a></li>
<li><a href="Wc_(Unix)" title="Wc (Unix)">wc</a></li>
<li><a href="Xargs" title="Xargs">xargs</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Shell_builtin" title="Shell builtin">Shell builtins</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Alias_(command)" title="Alias (command)">alias</a></li>
<li><a href="Cd_(command)" title="Cd (command)">cd</a></li>
<li><a href="Echo_(command)" title="Echo (command)">echo</a></li>
<li><a href="Test_(Unix)" title="Test (Unix)">test</a></li>
<li><a href="Environment_variable#unset_command" title="Environment variable">unset</a></li>
<li><a href="Wait_(command)" title="Wait (command)">wait</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Searching</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Find_(Unix)" title="Find (Unix)">find</a></li>
<li><a href="Grep" title="Grep">grep</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Documentation</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Man_page" title="Man page">man</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Software_development" title="Software development">Software development</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Ar_(Unix)" title="Ar (Unix)">ar</a></li>
<li><a href="Ctags" title="Ctags">ctags</a></li>
<li><a href="Lex_(software)" title="Lex (software)">lex</a></li>
<li><a href="Make_(software)" title="Make (software)">make</a></li>
<li><a href="Nm_(Unix)" title="Nm (Unix)">nm</a></li>
<li><a href="Strip_(Unix)" title="Strip (Unix)">strip</a></li>
<li><a href="Yacc" title="Yacc">yacc</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Miscellaneous</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Bc_(programming_language)" title="Bc (programming language)">bc</a></li>
<li><a href="Cal_(command)" title="Cal (command)">cal</a></li>
<li><a href="Expr" title="Expr">expr</a></li>
<li><a href="System_V_printing_system" title="System V printing system">lp</a></li>
<li><a href="Od_(Unix)" title="Od (Unix)">od</a></li>
<li><a href="Sleep_(command)" title="Sleep (command)">sleep</a></li>
<li><a href="True_and_false_(commands)" title="True and false (commands)">true and false</a></li></ul>
</div></td></tr><tr><td class="navbox-abovebelow hlist" colspan="2"><div>
<ul><li><span class="noviewer" typeof="mw:File"><span title="Category"></span></span> <b>Categories</b>
<ul><li>Standard Unix programs</li>
<li>Unix SUS2008 utilities</li></ul></li>
<li><span class="noviewer" typeof="mw:File"><span title="List-Class article"></span></span> <b><a href="List_of_POSIX_commands" title="List of POSIX commands">List</a></b></li></ul>
</div></td></tr></tbody></table></div>
<div class="navbox-styles"></div><div role="navigation" class="navbox" aria-labelledby="Plan_9_command-line_interface_programs_and_shell_builtins358" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Plan_9_command-line_interface_programs_and_shell_builtins358" style="font-size:114%;margin:0 4em"><a href="Plan_9_from_Bell_Labs" title="Plan 9 from Bell Labs">Plan 9</a> <a href="Command-line_interface" title="Command-line interface">command-line interface</a> programs and <a href="Shell_builtin" title="Shell builtin">shell builtins</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">File system</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Chmod" title="Chmod">chmod</a></li>
<li><a href="Chgrp" title="Chgrp">chgrp</a></li>
<li><a href="Cmp_(Unix)" title="Cmp (Unix)">cmp</a></li>
<li><a href="Cp_(Unix)" title="Cp (Unix)">cp</a></li>
<li><a href="Dd_(Unix)" title="Dd (Unix)">dd</a></li>
<li><a href="Du_(Unix)" title="Du (Unix)">du</a></li>

<li><a href="Gzip" title="Gzip">gzip</a></li>
<li><a href="Ls" title="Ls">ls</a></li>
<li><a href="Mkdir" title="Mkdir">mkdir</a></li>
<li><a href="Pwd" title="Pwd">pwd</a></li>
<li><a href="Rm_(Unix)" title="Rm (Unix)">rm</a></li>
<li><a href="Split_(Unix)" title="Split (Unix)">split</a></li>
<li><a href="Tee_(command)" title="Tee (command)">tee</a></li>
<li><a href="Touch_(command)" title="Touch (command)">touch</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Processes</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Kill_(command)" title="Kill (command)">kill</a></li>
<li><a href="Ps_(Unix)" title="Ps (Unix)">ps</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">User environment</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Passwd" title="Passwd">passwd</a></li>
<li><a href="Who_(Unix)" title="Who (Unix)">who</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Text processing</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="AWK" title="AWK">awk</a></li>
<li><a href="Basename" title="Basename">basename</a></li>
<li><a href="Comm" title="Comm">comm</a></li>
<li><a href="Diff" title="Diff">diff</a></li>
<li><a href="Ed_(text_editor)" class="mw-redirect" title="Ed (text editor)">ed</a></li>
<li><a href="Eqn_(software)" title="Eqn (software)">eqn</a></li>
<li><a href="Join_(Unix)" title="Join (Unix)">join</a></li>
<li><a href="Sed" title="Sed">sed</a></li>
<li><a href="Sort_(Unix)" title="Sort (Unix)">sort</a></li>
<li><a href="Spell_(Unix)" title="Spell (Unix)">spell</a></li>
<li><a href="Strings_(Unix)" title="Strings (Unix)">strings</a></li>
<li><a href="Tail_(Unix)" title="Tail (Unix)">tail</a></li>
<li><a href="Tr_(Unix)" title="Tr (Unix)">tr</a></li>
<li><a href="Troff" title="Troff">troff</a></li>
<li><a href="Uniq" title="Uniq">uniq</a></li>
<li><a href="Wc_(Unix)" title="Wc (Unix)">wc</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Shell_builtin" title="Shell builtin">Shell builtins</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Echo_(command)" title="Echo (command)">echo</a></li>
<li><a href="Test_(Unix)" title="Test (Unix)">test</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Network_utility" title="Network utility">Networking</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Ipconfig" title="Ipconfig">ip/ipconfig</a></li>
<li><a href="Ping_(networking_utility)" title="Ping (networking utility)">ip/ping</a></li>
<li><a href="Netstat" title="Netstat">netstat</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Searching</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Grep" title="Grep">grep</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Software_development" title="Software development">Software development</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Ar_(Unix)" title="Ar (Unix)">ar</a></li>
<li><a href="Hoc_(programming_language)" title="Hoc (programming language)">hoc</a></li>
<li><a href="Lex_(software)" title="Lex (software)">lex</a></li>
<li><a href="Nm_(Unix)" title="Nm (Unix)">nm</a></li>
<li><a href="Strip_(Unix)" title="Strip (Unix)">strip</a></li>
<li><a href="Yacc" title="Yacc">yacc</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Miscellaneous</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Bc_(programming_language)" title="Bc (programming language)">bc</a></li>
<li><a href="Cal_(command)" title="Cal (command)">cal</a></li>
<li><a href="Fortune_(Unix)" title="Fortune (Unix)">fortune</a></li>
<li><a href="Sleep_(command)" title="Sleep (command)">sleep</a></li></ul>
</div></td></tr><tr><td class="navbox-abovebelow hlist" colspan="2"><div>
<ul><li><span class="noviewer" typeof="mw:File"><span title="Category"></span></span>&nbsp;Category</li></ul>
</div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-05-05" href="https://en.wikipedia.org/wiki/?title=File_(command)&amp;oldid=1288988739">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>